* Offscreen windows can be used to transform parts of a widget
* hierarchy. Note that the rotated button is fully functional.
*/
-#define _GNU_SOURCE
#include <math.h>
#include <gtk/gtk.h>
double c, s;
double w, h;
- sincos (bin->angle, &s, &c);
+ s = sin (bin->angle);
+ c = cos (bin->angle);
child_area = bin->child->allocation;
w = c * child_area.width + s * child_area.height;
double c, s;
double w, h;
- sincos (bin->angle, &s, &c);
+ s = sin (bin->angle);
+ c = cos (bin->angle);
child_area = bin->child->allocation;
w = c * child_area.width + s * child_area.height;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
- sincos (bin->angle, &s, &c);
+ s = sin (bin->angle);
+ c = cos (bin->angle);
w = c * child_requisition.width + s * child_requisition.height;
h = s * child_requisition.width + c * child_requisition.height;
GtkRequisition child_requisition;
GtkAllocation child_allocation;
- sincos (bin->angle, &s, &c);
+ s = sin (bin->angle);
+ c = cos (bin->angle);
gtk_widget_get_child_requisition (bin->child, &child_requisition);
child_allocation.x = 0;
cr = gdk_cairo_create (widget->window);
/* transform */
- sincos (bin->angle, &s, &c);
+ s = sin (bin->angle);
+ c = cos (bin->angle);
w = c * child_area.width + s * child_area.height;
h = s * child_area.width + c * child_area.height;